﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq.Mapping;

namespace QuanLyPhongMach.Model
{
    [Table (Name = "KhamBenh")]
    public class CKhamBenh
    {
        #region Properties
        [Column(Name = "MaKhamBenh", IsPrimaryKey = true)]
        public int MaKhamBenh { get; set; }

        [Column(Name = "MaBenhNhan")]
        public int MaBenhNhan { get; set; }

        [Column(Name = "NgayKham")]
        public DateTime NgayKham { get; set; }

        [Column(Name = "TrieuChung")]
        public string TrieuChung { get; set; }

        [Column(Name = "MaLoaiBenh")]
        public int MaLoaiBenh { get; set; }

        [Column(Name = "TienKham")]
        public int TienKham { get; set; }

        [Column(Name = "TienThuoc")]
        public int TienThuoc { get; set; }
        #endregion

        #region Constructor
        public CKhamBenh()
        { 
        }

        public CKhamBenh(int mabenhnhan, DateTime ngaykham, string trieuchung, int maloaibenh)
        {
            Initialize(mabenhnhan, ngaykham, trieuchung, maloaibenh);
        }

        public CKhamBenh (int mabenhnhan, DateTime ngaykham, string trieuchung, int maloaibenh, int tienkham, int tienthuoc)
        {
            Initialize(mabenhnhan, ngaykham, trieuchung, maloaibenh);
            this.TienKham = tienkham;
            this.TienThuoc = tienthuoc;
        }

        public void Initialize(int mabenhnhan, DateTime ngaykham, string trieuchung, int maloaibenh)
        {
            this.MaBenhNhan = mabenhnhan;
            this.MaLoaiBenh = maloaibenh;
            this.NgayKham = ngaykham;
            this.TrieuChung = trieuchung;
        }
        #endregion
    }
}
